function label_crsc_onkernel = CRSC(Ks, nCluster)
projev = 1.5;
maxIter = 10;

[nSmp, ~, nKernel] = size(Ks);

Vs = cell(1, nKernel);
for i1 = 1:nKernel
    Vs{i1} = sc_onkernel(Ks(:,:,i1), nCluster, projev);
end

Vs_old = Vs;
for i1 = 1:maxIter
        Sall = zeros(nSmp, nSmp);
        for j=1:nKernel
            Sall = Sall + Vs_old{j} * Vs_old{j}';
        end
        for j=1:nKernel
            S_new = Ks(:,:,j) * (Sall - Vs_old{j}*Vs_old{j}');
            S_new = (S_new + S_new')/2;
            Vs{j} = sc_onkernel(S_new, nCluster, projev);
        end
        Vs_old = Vs;
end
for i1 = 1:nKernel
    Vs{i1} = NormalizeFea(Vs{i1});
end
V_final = cell2mat(Vs);
label_crsc_onkernel = litekmeans(V_final, nCluster, 'MaxIter', 100, 'Replicates', 50);
end

function [V] = sc_onkernel(K, nCluster, projev)
if ~exist('projev', 'var')
    projev = 1.5;
end
numEV = nCluster*projev;
dd = max(abs(sum(K,1)), 1e-9);
inv_sqrt_D = diag(1./sqrt(dd));
L = inv_sqrt_D*K*inv_sqrt_D;
L = (L+L')/2;
opts.disp = 0;
[V, ~] = eigs(L,ceil(numEV),'LA',opts);
V = V(:,1:ceil(nCluster*1));
end